# -*- coding: utf-8 -*-

import httplib

host = 'www.python.org'
#headers = {'User-Agent': 'Mozilla/5.0'}
conn = httplib.HTTPConnection(host)
conn.request('GET', '/', headers ={'User-Agent': 'Mozilla/5.0'})
# conn.putheader('User-Agent', 'Mozilla/5.0')
resp = conn.getresponse()
# inf = resp.getheader()
print resp.getheader('User-Agent')
print resp.getheader('Host')
text = resp.read()

import urllib2, cookielib
cookie_support= urllib2.HTTPCookieProcessor(cookielib.CookieJar())
opener = urllib2.build_opener(cookie_support, urllib2.HTTPHandler)
urllib2.install_opener(opener)
content = urllib2.urlopen('http://www.baidu.com').read()

import atool
atool.hello()
tx = '中国'
print tx
print atool.g2u(tx)

import pyperclip
ary = []
f = open('../inputfile/ee.txt')
for line in f:
    ary.append(line.split('\n')[0])
f.close()
seta = set(ary)
pyperclip.copy('\n'.join(seta))
print len(seta)